package com.mpyy.handler.purchase;

import com.alibaba.fastjson.JSON;
import com.mpyy.pojo.EmployeeInfo;
import com.mpyy.service.purchase.SearchEmployeeInfoServiceInter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @version 1.0
 * @Descoription SearchEmployeeHandlerInfo
 * @Author CG
 * @date 2022-03-16
 */
@Controller
@RequestMapping(value = "/searchEmployeeHandlerInfo")
public class SearchEmployeeHandlerInfo {
    @Autowired
    @Qualifier(value = "searchEmployeeInfoServiceImpl")
    private SearchEmployeeInfoServiceInter employeeInfoService;

    @RequestMapping(value = "/searchEmployeeInfo")
    @ResponseBody
    public String searchEmployeeInfo(){
        List<EmployeeInfo> employeeInfoList = employeeInfoService.searchEmployeeInfo();
        return JSON.toJSONString(employeeInfoList);
    }
}
